package cn.scw.project.goods.domain;

import cn.scw.framework.aspectj.lang.annotation.Excel;
import cn.scw.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
/**
 * 订单商品对象 g_order_commodity
 *
 * @author api
 * @date 2020-05-20
 */
public class GOrderCommodity extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 订单id */
    @Excel(name = "订单id")
    private Long orderId;

    /** 商品id */
    @Excel(name = "商品id")
    private Long commodityId;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private int count;

    /** 规格id */
    @Excel(name = "规格id")
    private Long modelId;

    /** 规格名称 */
    @Excel(name = "规格名称")
    private String modelName;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String commodityName;

    /** 缩略图 */
    @Excel(name = "缩略图")
    private String litimgUrl;

    /** 创建日期 */
    @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate=new Date();

    public GOrderCommodity(Long commodityId, int count, String commodityName, String litimgUrl) {
        this.commodityId = commodityId;
        this.count = count;
        this.commodityName = commodityName;
        this.litimgUrl = litimgUrl;
    }

    public GOrderCommodity() {
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }
    public void setCommodityId(Long commodityId)
    {
        this.commodityId = commodityId;
    }

    public Long getCommodityId()
    {
        return commodityId;
    }
    public void setCount(int count)
    {
        this.count = count;
    }

    public int getCount()
    {
        return count;
    }
    public void setModelId(Long modelId)
    {
        this.modelId = modelId;
    }

    public Long getModelId()
    {
        return modelId;
    }
    public void setModelName(String modelName)
    {
        this.modelName = modelName;
    }

    public String getModelName()
    {
        return modelName;
    }
    public void setCommodityName(String commodityName)
    {
        this.commodityName = commodityName;
    }

    public String getCommodityName()
    {
        return commodityName;
    }
    public void setLitimgUrl(String litimgUrl)
    {
        this.litimgUrl = litimgUrl;
    }

    public String getLitimgUrl()
    {
        return litimgUrl;
    }
    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("commodityId", getCommodityId())
            .append("count", getCount())
            .append("modelId", getModelId())
            .append("modelName", getModelName())
            .append("commodityName", getCommodityName())
            .append("litimgUrl", getLitimgUrl())
            .append("createDate", getCreateDate())
            .toString();
    }
}
